package cn.virens.util.poi.read;

public class SimpleCellObject<D> extends CellObject<D> {
	private String name;

	protected SimpleCellObject() {
		super(null, null);
	}

	@Override
	public String getName() {
		return name;
	}

	protected void setName(String name) {
		this.name = name;
	}

	@Override
	public int getRowIndex() {
		return -1;
	}

	@Override
	public int getCellIndex() {
		return -1;
	}

	public static <D> SimpleCellObject<D> createObject(String name, D object) {
		SimpleCellObject<D> cellObject = new SimpleCellObject<>();
		cellObject.setName(name);
		cellObject.setObject(object);

		return cellObject;
	}
}
